<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>注册</title>
<script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript">  
	$(document).ready(function() {
		$("#login").click(function() {
			login();
		});
	});

	function login() {
		var url = "getQandaList";
		$.getJSON(url, null, function callback(data) {
			// convert to json object  
			$.each(data.userInfosList,function(i,value){   
		 	          $("#result").append("用户名："+value.quest+"")
		                           .append("密码："+value.answer+"");
			});
		});
	}
</script>
</head>

<body>
	<form method="post" id="form">
		<input type="button" id="login" value='test' />
		<div id="result"></div>
	</form>
</body>
</html>